Fix getting views for Hive metastore 2.3+ #24466
Conversation
tdcmeehan
left a comment
There was a problem hiding this comment.
Please follow the instructions for Backport Commits in our commit standards.
|
@tdcmeehan , could you review this pr at your convenience? |
On certain databases (e.g. Derby, Oracle) it uses CLOB and these databases disallow `=` predicates over CLOB values. At the same time, they allow `LIKE` predicates over them. Cherry-pick of prestodb@179ffe4 Co-authored-by: Piotr Findeisen <piotr.findeisen@gmail.com>
f26755e to
b46a8fb
Compare
pratyakshsharma
left a comment
There was a problem hiding this comment.
There is a line break in second line of commit description. Will be good to correct that.
|
New release note guidelines as of last week: PR #24354 automatically adds links to this PR to the release notes. Please remove the manual PR link in the following format from the release note entries for this PR. I have updated the Release Notes Guidelines to remove the examples of manually adding the PR link. |
I think we leave a blank line at the end of the class variable? |
On certain databases (e.g. Derby, Oracle) it uses
CLOBand these databases disallow=predicates overCLOBvalues. At the same time, they allowLIKEpredicates over them.cherry-picked : trinodb/trino#833
Description
Added a new private method getPrestoViews(String databaseName):
a. First attempts = predicate on PRESTO_VIEW_FLAG.
b. If it fails, attempts LIKE predicate.
c. Stores successful attempts in metastoreKnownToSupportTableParamEqualsPredicate and metastoreKnownToSupportTableParamLikePredicate.
Motivation and Context
Hive 2.3 metastoreprovides more space for table parameter values. On certain databases (e.g. Derby, Oracle) it usesCLOBand these databases disallow=predicates overCLOB values. At the same time, they allowLIKEpredicates over them.This fixes
SHOW TABLESand queries over information_schema.tables.Also, fixes #10735, nico-arianto/big-data-local#1.
Impact
Clob datatype issue resolved.
Test Plan
checked using presto-cli.
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.